<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="root">
<template v-if="isLogin">
    <p>已经登陆：欢迎xxx的到来</p>
    <p>昵称：xxxxx</p>
    <p>年龄：21</p>
</template>
<form v-else>
    <input type="text" placeholder="请输入账号">
    <input type="password" placeholder="请输入密码">
</form>
</div>
</body>
<script>
    new Vue({
        el: '#root',
        data: {
            isLogin: false,
        }
    })
</script>
</html>